package month4.day19;

import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;

public class C2 {
    public static void main(String[] args) {
        Set s=new HashSet<>();
        s.add("dog");
        s.add("cat");
        s.add(Math.E);
        s.add("tiger");
        System.out.println(s.contains("ddd"));
        System.out.println(s.remove("cat"));
        System.out.println(s.size());
        Iterator ir=s.iterator();
        while (ir.hasNext()) {
            Object next =  ir.next();
            System.out.println(next);
        }
        s.clear();
        System.out.println(s.size());
        System.out.println(s.isEmpty());

    }
}
